package com.sunwayworld.basemodule.basedata.knowledgelibrary.resource.impl;

import com.alibaba.fastjson.JSONObject;
import com.sunwayworld.module.item.file.bean.CoreFileBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.sunwayworld.basemodule.basedata.knowledgelibrary.resource.LimsKnowledgelibraryResource;
import com.sunwayworld.basemodule.basedata.knowledgelibrary.service.LimsKnowledgelibraryService;
import com.sunwayworld.framework.spring.annotation.GikamBean;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogModule;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;

@LogModule("知识库管理表")
@RestController
@GikamBean
public class LimsKnowledgelibraryResourceImpl implements LimsKnowledgelibraryResource {

    @Autowired
    private LimsKnowledgelibraryService limsKnowledgelibraryService;

    @Override
    public LimsKnowledgelibraryService getService() {
        return limsKnowledgelibraryService;
    }

    @Log(value = "新增知识库管理表", type = LogType.INSERT)
    @Override
    @RequestMapping(method = RequestMethod.POST)
    public Long insert(RestJsonWrapperBean wrapper) {
        return getService().insert(wrapper);
    }

    @Override
    public JSONObject setActiveStatus(RestJsonWrapperBean jsonWrapperBean) {
        return getService().setActiveStatus(jsonWrapperBean);
    }

    @Override
    public JSONObject saveAuthorizedPeople(RestJsonWrapperBean jsonWrapperBean) {
        return getService().saveAuthorizedPeople(jsonWrapperBean);
    }

    @Override
    public JSONObject refreshHomePageData(RestJsonWrapperBean jsonWrapperBean) {
        return getService().refreshHomePageData(jsonWrapperBean);
    }

    @Override
    public JSONObject refreshKnowledgeLibraryData(RestJsonWrapperBean jsonWrapperBean) {
        return getService().refreshKnowledgeLibraryData(jsonWrapperBean);
    }

    @Override
    public JSONObject refreshRemarkNoteData(RestJsonWrapperBean jsonWrapperBean) {
        return getService().refreshRemarkNoteData(jsonWrapperBean);
    }

    @Override
    public JSONObject refreshExperimentInformationData(RestJsonWrapperBean jsonWrapperBean) {
        return getService().refreshExperimentInformationData(jsonWrapperBean);
    }

    @Override
    public JSONObject refreshToDoData(RestJsonWrapperBean jsonWrapperBean) {
        return getService().refreshToDoData(jsonWrapperBean);
    }

    @Override
    public JSONObject refreshNotificationData(RestJsonWrapperBean jsonWrapperBean) {
        return getService().refreshNotificationData(jsonWrapperBean);
    }

    @Override
    public JSONObject refreshMenuNameData(RestJsonWrapperBean jsonWrapperBean) {
        return getService().refreshMenuNameData(jsonWrapperBean);
    }

    @Override
    public JSONObject insertRemarkNote(JSONObject data) {
        return getService().insertRemarkNote(data);
    }

    @Override
    public JSONObject deleteRemarkNote(JSONObject data) {
        return getService().deleteRemarkNote(data);
    }

    @Override
    public JSONObject updateRemarkNote(JSONObject data) {
        return getService().updateRemarkNote(data);
    }

    @Override
    public CoreFileBean selectCoreFileByRowId(Long rowId) {
        return getService().selectCoreFileByRowId(rowId);
    }
}
